import 'package:flutter/material.dart';
import '../model/category.dart';


class CategoryGoodsListProvide with ChangeNotifier{
    List<CategoryGoodItemModel> goodsList = [];
    bool isLoading = false;

    //请求数据时
    changeloadingState(){
      isLoading = true;
    }

    //点击大类时更换商品列表
    getGoodsList(List<CategoryGoodItemModel> list){
      goodsList=list;
      isLoading = false;
      notifyListeners();
    }
    //上拉加载列表
    addGoodsList(List<CategoryGoodItemModel> list){
       goodsList.addAll(list);
       notifyListeners();
    }
}
